projects
/
emacs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c3b5912
)
(grep-read-files): Strip trailing <N> from buffer names
author
Juri Linkov
<juri@jurta.org>
Sun, 30 Aug 2009 23:46:09 +0000
(23:46 +0000)
committer
Juri Linkov
<juri@jurta.org>
Sun, 30 Aug 2009 23:46:09 +0000
(23:46 +0000)
not visiting a file (e.g. cloned buffers).
lisp/progmodes/grep.el
patch
|
blob
|
history
diff --git
a/lisp/progmodes/grep.el
b/lisp/progmodes/grep.el
index 5c199016c653096e689e106523d303434dffbb43..bf626f6e308ea8bb9cbfb4b33a9f45718d8b05f7 100644
(file)
--- a/
lisp/progmodes/grep.el
+++ b/
lisp/progmodes/grep.el
@@
-748,7
+748,8
@@
substitution string. Note dynamic scoping of variables.")
(defun grep-read-files (regexp)
"Read files arg for interactive grep."
- (let* ((bn (or (buffer-file-name) (buffer-name)))
+ (let* ((bn (or (buffer-file-name)
+ (replace-regexp-in-string "<[0-9]+>\\'" "" (buffer-name))))
(fn (and bn
(stringp bn)
(file-name-nondirectory bn)))